package com.bcx.crm.service.docTemplateService;

import com.bcx.crm.mapper.docTemplateMapper.DeleteDocTemplateMapper;
import com.bcx.crm.plat.core.utils.SpringContextHolder;
import com.bcx.crm.plat.util.UtilTool;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by ys on 2018/4/2.
 */
@Service
public class DeleteDocTemplateServiceImpl implements DeleteDocTemplateService {
    private static final String DELETE_DOC_TEMPLATE_MAPPER = "deleteDocTemplateMapper";  //删除的 mapper
    @Override
    public boolean deleteDocTemplateByRowIds(List list) {
        if (UtilTool.isValidCollection(list)){
            DeleteDocTemplateMapper deleteDocTemplateMapper = SpringContextHolder.getBean(DELETE_DOC_TEMPLATE_MAPPER);
            return deleteDocTemplateMapper.deleteDocTemplateByRowIds(list);
        }
        return false;
    }
}
